<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人信息修改</title>
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$(":button:first").click(function(){
		var p=$(":password:first").val();
		var p1=$(":password:eq(1)").val();
		var p2=$(":password:eq(2)").val();
		if(p==""||p1==""){
			alert("请输入密码!");
		}else if(p2!=p1){
			alert("两次密码不一致!");
		}else if(p1==p){
			alert("新密码和旧密码一致!");
		}else{
			$("form").submit;
		}
	});
});
</script>
</head>
<body>
<form action="BuyerUpdateServlet" >
旧密码:&nbsp;<input type="password" name="oldpassword"><br>
新密码:&nbsp;<input type="password" name="newpassword"><br>
确认密码:<input type="password" name="newpassword2"><br>
用户昵称:<input type="text" name="nickname"><br>
手机号:&nbsp;<input type="text" name="phonenumber"><br>
真实姓名:<input type="text" name="truename"><br>
证件号:&nbsp;<input type="text" name="idnumber"><br>
<input type="button" value="修改"> 
</form>
</body>
</html>